package com.xhs.main.service.cwb.impl;

/**
 * 退款信息
 */

import com.xhs.main.dao.cwb.CwbRefundDao;
import com.xhs.main.entity.cwb.CwbRefund;
import com.xhs.main.service.cwb.CwbRefundService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CwbRefundServiceImpl implements CwbRefundService {

    @Autowired
    CwbRefundDao cwbRefundDao;

    @Override
    public void addCwbRefund(CwbRefund cwbRefund) {
        cwbRefundDao.insertCwbRefund(cwbRefund);
    }

    @Override
    public List<CwbRefund> getAllCwbRefund() {
        List<CwbRefund> cwbRefunds = cwbRefundDao.selectAllCwbRefund();
        return cwbRefunds;
    }

    @Override
    public CwbRefund getOneByID(Integer cwbRId) {
        CwbRefund cwbRefund = cwbRefundDao.selectOneByID(cwbRId);
        return cwbRefund;
    }

    @Override
    public Double getAllMoney(String clientName) {
        Double money = cwbRefundDao.selectAllMoney(clientName);
        return money;
    }

    @Override
    public Integer getAllOpr() {
        Integer count = cwbRefundDao.selectAllOpr();
        return count;
    }

    @Override
    public Integer getAllNoOpr() {
        Integer count = cwbRefundDao.selectAllOpr();
        return count;
    }
}
